from ..utils import Register, build_module


BACKBONE = Register('backbone')
DETECTOR = Register('detector')


def build_backbone(backbone_cfg):
    return build_module(backbone_cfg, BACKBONE)


def build_detector(detector_cfg):
    return build_module(detector_cfg, DETECTOR)